import request from "../axios/request.js";
//发送分页+条件查询
export const getCategoryApi = (queryPageInfo) => {
    return request.post("/api/article/query",queryPageInfo)
}
//根据id查询文章
export const getArticleById = (aid) => {
    return request({
        method: "get",
        url: "/api/article/getArticle",
        headers: {
            "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
        },
        params:{
            aid:aid
        }
    })
}
//阅读量+1
export const increasedReading = (aid) => {
    return request({
        method: "get",
        url: "/api/article/addReading",
        headers: {
            "Content-Type": "application/x-www-form-urlencoded;charset=utf-8",
        },
        params:{
            aid:aid
        }
    })
}
//新增文章
export const insertArticle = (insertArticleInfo) => {
    return request.post("/api/article/insertArticle",insertArticleInfo)
}